package com.laolang.ssh.v1.pojo;

import java.util.ArrayList;
import java.util.List;

import com.google.gson.annotations.SerializedName;
import com.laolang.ssh.domain.BookType;

public class BookTypePojo {

	public BookTypePojo() {
		super();
	}

	public BookTypePojo(BookType bookType) {
		this.id = bookType.getId();
		this.typeName = bookType.getTypeName();
		this.typeDesc = bookType.getTypeDesc();
		this.typeFamily = bookType.getTypeFamily();
		this.typeValid = bookType.isTypeValid();
	}

	public static List<BookTypePojo> getBookTypePojos(List<BookType> bookTypes) {
		List<BookTypePojo> bookTypePojos = new ArrayList<BookTypePojo>();
		if (bookTypes.size() > 0) {
			for (BookType bookType : bookTypes) {
				bookTypePojos.add(new BookTypePojo(bookType));
			}
		}
		return bookTypePojos;
	}

	@Override
	public String toString() {
		return "BookTypePojo [id=" + id + ", typeName=" + typeName + ", typeDesc=" + typeDesc + ", typeFamily=" + typeFamily + ", typeValid="
				+ typeValid + "]";
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getTypeDesc() {
		return typeDesc;
	}

	public void setTypeDesc(String typeDesc) {
		this.typeDesc = typeDesc;
	}

	public String getTypeFamily() {
		return typeFamily;
	}

	public void setTypeFamily(String typeFamily) {
		this.typeFamily = typeFamily;
	}

	public boolean isTypeValid() {
		return typeValid;
	}

	public void setTypeValid(boolean typeValid) {
		this.typeValid = typeValid;
	}

	@SerializedName("id")
	private Integer id;

	@SerializedName("typeName")
	private String typeName;

	@SerializedName("typeDesc")
	private String typeDesc;

	@SerializedName("typeFamily")
	private String typeFamily;

	@SerializedName("typeValid")
	private boolean typeValid;

}
